#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QWidget>
#include <QHBoxLayout>
#include <QVBoxLayout>
#include <QPushButton>
#include <QLabel>
#include <QMenuBar>
#include <QMenu>
#include <QAction>
#include <QDateTime>
#include <QFileDialog>

#include "camview.h"
#include "camera.h"
#include "worker.h"

class MainWindow : public QMainWindow
{
	Q_OBJECT
public:
	explicit MainWindow(const QString& title, QWidget *parent = 0);
	~MainWindow();

protected:
	void closeEvent(QCloseEvent *);

private slots:
	void on_capture_button_clicked();
	void on_menu_open();
	void on_menu_info();
	void on_slider_moved(int);
private:
	CamView* camview;
	Camera* camera;
	Worker* worker;
	Detector* detector;

    CamView* imageView;

    QMenu* fileMenu;
    QMenu* helpMenu;

    QAction* openAction;
    QAction* quitAction;
    QAction* infoAction;

    QWidget* centralWidget;
    QVBoxLayout* mainLayout;
    QHBoxLayout* ctrlLayout;

	QLabel* label;
    QSlider* slider;
    QPushButton* captureButton;
};

#endif // MAINWINDOW_H
